﻿/// <reference path="~/Scripts/lib/knockout-2.2.0.js" />
/// <reference path="~/Scripts/app/config.js" />

/**
 @title:        model.workspace
 @description:  Model for general workspace view. Will be substituted in future to more specific model.
 @author:       Yuriy Shapovalov (shapovalov.yuri@gmail.com)
 */

define('model.workspace',
    ['ko', 'config'],
    function (ko, config) {
        var 
            _dc = null,
            settings = {},

            // Workspace model, probably should be used in vm.workspace component.
            // Should be able to build this object by received data from the server.
            Workspace = function () {
                debugger //check when and who request of creating this object
                var self = this;
                self.id = ko.observable();
                self.activities = ko.observableArray();
                self.timer = ko.observable();
                self.date = ko.observable();
            };

            // TODO: Clarify what this datacontext mean. What is it for.
        Workspace.datacontext = function (dc) {
            if (dc) { // assign new value from parameter, or just get existing one
                _dc = dc; 
            }
            return _dc;
        };
        return Workspace;

    });